package cn.seaboot.admin.other.service;

import cn.seaboot.admin.user.service.UserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author ChenSS 2019年3月25日 下午2:44:55
 */
@Service
public class WeiXinService {

    @Resource
    private UserService userService;

    /**
     * 绑定OpenId
     */
    public int bindUser(String account, String password,
                        String userNick,
                        String userHeader,
                        String openId) {
//         if (userDao.selectByUserCode(account) == null) {
//             throw new BizException("该账号不存在！");
//         }
//
//         User user = new User();
//         user.setUsername(userNick);
//         user.setUserHeader(userHeader);
//
//         user.setUserCode(account);
//         return userDao.updateSampleById(user);
        return 1;
    }//   /**
//    * 使用OpenId查询ID
//    */
//   @Cacheable(cacheNames = SystemConstant.CACHE_DEF, key = "'SysUserOpenId' + #openId")
//   public User queryByOpenId(String openId) {
//     return userDao.selectByOpenId(openId);
//   }

}
